var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, a) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var a in e)
              Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]);
          })(e, a);
      };
      return function (e, a) {
        function n() {
          this.constructor = e;
        }
        if ("function" != typeof a && null !== a)
          throw new TypeError(
            "Class extends value " + String(a) + " is not a constructor or null"
          );
        t(e, a),
          (e.prototype =
            null === a
              ? Object.create(a)
              : ((n.prototype = a.prototype), new n()));
      };
    })(),
  MountsDetailsDialog = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        WebSocketService.addListener({
          caller: e,
          code: 4421,
          method: e.onLoadMountsDetailsData,
        }),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showMountsDetailDialog = function (t) {
        null == this.detailV &&
          ((this.detailV = new e()), (this.detailV.zOrder = 1e3)),
          this.detailV.popup(!0),
          WebSocketService.send({ c: 4421, d: { id: t } });
      }),
      (e.prototype.onLoadMountsDetailsData = function (t) {
        if (0 == t.code) {
          this.label_mounts_title.text = t.data.name;
          var e = "",
            a = [];
          t.data.hpIni > -1e3 &&
            (a.push(["气血初值：", t.data.hpIni]), (e = t.data.hp + "气血 ")),
            t.data.mpIni > -1e3 &&
              (a.push(["精力初值：", t.data.mpIni]),
              (e = e + t.data.mp + "精力 ")),
            t.data.apIni > -1e3 &&
              (a.push(["攻击初值：", t.data.apIni]),
              (e = e + t.data.ap + "攻击 ")),
            t.data.spIni > -1e3 &&
              (a.push(["速度初值：", t.data.spIni]),
              (e = e + t.data.sp + "速度 ")),
            a.length > 0 &&
              ((this.label_mout_item1.text = a[0][0]),
              (this.label_mou_apInit.text = a[0][1])),
            a.length > 1
              ? ((this.label_mout_item2.text = a[1][0]),
                (this.label_mou_spInit.text = a[1][1]))
              : ((this.label_mout_item2.text = ""),
                (this.label_mou_spInit.text = "")),
            (this.label_mounts_details.text = t.data.descr),
            (this.label_mou_lvl.text = "100级可增加 " + e),
            (this.image_mounts_details_horse.skin =
              "fujiangfull/horse_" + t.data.img + ".png");
        } else ToastView.toastView(t.msg);
      }),
      (e.prototype.horseStringWithName = function (t) {
        return "fujiangfull/horse_" + t + ".png";
      }),
      e
    );
  })(ui.MountsController.MountsDetailsDialogUI);
